package com.jason.glidetest;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private Button bt_single, bt_list, bt_grid;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        bt_single = (Button) findViewById(R.id.single);
        bt_single.setOnClickListener(this);
        bt_list = (Button) findViewById(R.id.list);
        bt_list.setOnClickListener(this);
        bt_grid = (Button) findViewById(R.id.grid);
        bt_grid.setOnClickListener(this);









    }

    @Override
    public void onClick(View v) {

        Intent intent = null;

        switch (v.getId()) {

            case R.id.single:
                intent = new Intent(this, SingleActivity.class);
                break;

            case R.id.list:
                intent = new Intent(this, ListImageActivity.class);
                break;


            case R.id.grid:
                intent = new Intent(this, GridActivity.class);
                break;



        }
        startActivity(intent);

    }
}
